package com.fattyCorps.account.uitl;

import cn.hutool.crypto.digest.BCrypt;

/* 密码加密工具类 */
public class BcryptUtils {

    // 加密
    public static String encode(String password) {
        return BCrypt.hashpw(password, BCrypt.gensalt());
    }

    // 验证
    public static boolean match(String password, String encodePassword) {
        return BCrypt.checkpw(password, encodePassword);
    }

}